def solve(nums):
    i,n=0,len(nums)
    while i<n and nums[i]%2==1: i+=1
    j=i+1
    while j<n and i<j:
        while nums[j]%2==0: j+=1
        if j<n:
            nums[i],nums[j]=nums[j],nums[i]
            i+=1
            j+=1
            while i<n and nums[i]%2==1: i+=1

nums=list(map(int,input().split()))
solve(nums)
print(nums)